package me.wangxuan.pat;

import java.io.IOException;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;

public class LoggingConfig {
	public static void init() {
		try {
			FileHandler fileHandler = new FileHandler("app.log", true);
			fileHandler.setFormatter(new SimpleFormatter());
			Logger.getLogger("global").addHandler(fileHandler);
			Logger.getLogger("global").setLevel(Level.ALL);
		} catch (SecurityException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
